home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 17 April 1997
- // Author: gf
- //
- //
- // Procedure Name:
- // menubarHotkeyMM
- //
- // Description:
- // This procedure sets up a hotkey-based
- // marking menu for rapidly switching between
- // menubar tabs.
- //
- // Input Arguments:
- //
- // Return Value:
- // None.
- //
-
-
-
- global proc syncHotboxMode (string $mode )
- {
- // If hotbox is in "Show All" mode then ignore
- if (`hotBox -q -a`)
- return;
-
-
- // Update the working mode
- //
- switch( $mode ) {
- case "Animation": hotBox -ao; break;
- case "Modeling": hotBox -mo; break;
- case "Rendering": hotBox -ro; break;
- case "Dynamics": hotBox -do; break;
- case "Cloth": hotBox -clo; break;
- case "Fur" : hotBox -ro; break;
- case "Live": hotBox -lo; break;
- case "Fluids": hotBox -do; break;
- default: hotBox -ao; break;
- }
-
- }
-
-
-
- global proc menubarHotkeyMM()
- //
- // Creates a marking menu that allows the user
- // to select from the menubar tabs. It reuses
- // the name tempMM for the name of the menu, to
- // ensure that there's only one of these at
- // any one time.
- //
- {
- if( `popupMenu -exists tempMM` )
- {
- deleteUI tempMM;
- }
-
- popupMenu -mm 1 -b 1 -p viewPanes tempMM;
- menuItem -rp "N" -l "Modeling"
- -c "setMenuMode Modeling; syncHotboxMode Modeling"
- -enableCommandRepeat false;
- menuItem -rp "E" -l "Animation"
- -c "setMenuMode Animation; syncHotboxMode Animation"
- -enableCommandRepeat false;
- menuItem -rp "S" -l "Dynamics"
- -c "setMenuMode Dynamics; syncHotboxMode Dynamics"
- -enableCommandRepeat false;
- menuItem -rp "W" -l "Rendering"
- -c "setMenuMode Rendering; syncHotboxMode Rendering"
- -enableCommandRepeat false;
-
- // These items are only available in Maya Unlimited.
- //
- // Note that there really should be a license check explicitly
- // for cloth/fur/live. Currently, there isn't so that is why the test
- // below is on fluids, since fluids == Unlimited for 5.0
- //
- if( fluidEditLicenseFound() ) {
-
- if( `pluginInfo -q -l "CpClothPlugin"` )
- {
- menuItem -rp "NE" -l "Cloth"
- -c "setMenuMode Cloth; syncHotboxMode Cloth"
- -enableCommandRepeat false;
- }
-
- if( `pluginInfo -q -l "Fur"` )
- {
- menuItem -rp "NW" -l "Fur"
- -c "setMenuMode Rendering; syncHotboxMode Fur"
- -enableCommandRepeat false;
- }
-
- if( `pluginInfo -q -l "mayalive"` )
- {
- menuItem -rp "SW" -l "Live"
- -c "setMenuMode Live; syncHotboxMode Live"
- -enableCommandRepeat false;
- }
-
- menuItem -rp "SE" -l "Fluids"
- -c "setMenuMode Dynamics; syncHotboxMode Fluids"
- -enableCommandRepeat false;
- }
-
-
- setParent -m ..;
- }
-
-